<%-- 
    Document   : index
    Created on : Dec 4, 2010, 6:05:54 PM
    Author     : edwinelpaisa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page session="true"%>
<%@page import="java.sql.ResultSet"%>
<!doctype html>
<%
                HttpSession sessionUser=request.getSession();
                String value = "";
                int typeUser = -1;
                if(sessionUser.getAttribute("result") != null){
                    ResultSet res=(ResultSet)sessionUser.getAttribute("result");
                    value = res.getString(4);
                    typeUser = res.getInt(6);
                }
%>
<html>
    <head>
        <title>:: TRAVEL MAP ::</title>
        <!--Styles-->
        <link href="styles/main.css" rel="stylesheet" type="text/css">
        <link href="styles/menu.css" rel="stylesheet" type="text/css">
        <link rel="stylesheet" type="text/css" href="js/jquery/fancybox/fancybox/jquery.fancybox-1.3.1.css"/>
        <link href="styles/register.css" rel="stylesheet" type="text/css" />
        <link href="js/jquery/alerts/jquery.alerts.css" rel="stylesheet" type="text/css" />        

        <script src="js/jquery/jquery-1.4.2.js" type="text/javascript"></script>
        <script type="text/javascript" src="js/jquery/fancybox/fancybox/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="js/jquery/fancybox/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
        <script type="text/javascript" src="js/jquery/fancybox/fancybox/jquery.fancybox-1.3.1.js"></script>
        <script type="text/javascript" src="js/jquery/alerts/jquery.alerts.js"></script>

        <script type="text/javascript" language="javascript" src="js/ajax.js"></script>
        <script type="text/javascript" language="javascript" src="js/login.js"></script>
        <script type="text/javascript" language="javascript" src="js/register.js"></script>
    </head>

    <body>
        <div id="main">
            <div id="header" align="right">
                <div id="loged"<%
        if(sessionUser.getAttribute("result") != null){%>
        style="display: block;"
             <%}%>><br><br>
             <%=value%><span>&nbsp; &nbsp; | &nbsp; &nbsp;</span>
            <input type="button" id="logoutUser" value="Cerrar Sesión" class="button_form" onclick="btnLogout_onclick()">
        </div>
                <img style="z-index: 2; position: relative;" src="images/logo.png"/>
            </div>
            <div id="buttons">
                <ul id="nav">
                <li><a href="index.jsp" class="uno"><img src="icons/home.png" id="home"/></a></li>
                <li><a href="view/enterprise.html" target="content" class="uno">Empresa</a>
                    <ul>
                        <%if(typeUser == 2){%>
                        <li><a href="view/userAdmin.jsp" target="content">Usuarios</a></li>
                        <%}%>
                        <li><a href="view/mission.html" target="content">Misi&oacute;n</a></li>
                        <li><a href="view/vision.html" target="content">Visi&oacute;n</a></li>
                    </ul>
                </li>
                <li><a href="view/map.jsp" class="uno" target="content">Mapas</a>
                    <%if(typeUser == 2){%>
                    <ul>
                        <li><a href="view/mapAdmin.jsp" target="content">Administrar</a></li>
                    </ul>
                    <%}%>
                </li>
                <li><a href="view/route.html" class="uno">Rutas</a>
                    <%if(typeUser == 2){%>
                    <ul>
                        <li><a href="">Administrar</a>
                            <ul>
                                <li><a href="view/rutas.jsp" target="content">Rutas</a></li>
                                <li><a href="view/cities.jsp" target="content">Ciudades</a></li>
                                <li><a href="view/drivers.jsp" target="content">Conductores</a></li>
                                <li><a href="view/vehicles.jsp" target="content">Vehículos</a></li>
                            </ul>
                        </li>
                        <li><a href="view/graRoutes.jsp" target="content">Consulta</a></li>
                    </ul>
                    <%}%>
                </li>
                <li><a href="#" class="uno">Tickets</a>
                    <ul>
                        <%if(typeUser >= 0){%>
                            <li><a href="view/reserve.jsp" target="content" >Reservar</a></li>
                        <%}%>
                        <%if(typeUser == 2){%>
                            <li><a href="view/sale.jsp" target="content">Vender</a></li>
                        <%}%>
                    </ul>
                </li>
                <li><a href="view/contacts.html" target="content" class="uno">Contactos</a></li>
                </ul>
            </div>
            <iframe name="content" src="view/travelMap.jsp" id="content" style="width:870px; height: 450px;" frameborder="0" scrolling="no"></iframe>
        </div>
        <center><div id="footer">
                <p><a href="view/contacts.html" target="content">Contactos</a> | <a href="view/enterprise.html" target="content">Empresa</a> | <a href="view/mission.html" target="content">Misi&oacute;n</a> | <a href="view/vision.html" target="content">Visi&oacute;n</a><br />
	Copyright &copy; 2010 ---. Todos los derechos Reservados.<br/>
                    Desarrollo, Soporte y Mantenimiento: SWPport</p>
            </div></center>
    </body></html>